package cn.com.surker.sale.service;

import cn.com.surker.sale.entity.SaleManRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.com.surker.spring.RestResultDto;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
* <p>
    * 销售合同人员记录表 服务类
    * </p>
*
* @author admin
* @since 2024-08-03
*/
public interface SaleManRecordBaseService extends IService<SaleManRecord> {

    /**
     * 根据合同查询销售人员信息
     * @param contractId
     * @return
     */
    List<SaleManRecord> findContract(Long contractId);

    /**
     * 新增历史记录
     * @param record
     * @return
     */
    Integer saveRecord(SaleManRecord record);

    /**
     * 根据合同信息批量新增
     * @param ids
     * @param newSales
     * @param takeTime
     * @param remark
     * @param creator
     * @return
     */
    Integer updateBatchByContract(String ids, String newSales, String takeTime, String remark, String creator);

    /**
     * 批量修改销售人员记录
     * @param newSales
     * @param oldSales
     * @param takeTime
     * @param creator
     * @return
     */
    Integer updateBatch(Long orgId, String newSales, String oldSales, String takeTime, String remark, String creator);
}
